/*
 * @Author: your name
 * @Date: 2022-07-13 16:54:35
 * @LastEditTime: 2022-08-18 21:34:42
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \PWM_Demo\Middlewares\Device\ICM.h
 */


#ifndef MIDDLEWARES_DEVICE_ICM_H_
#define MIDDLEWARES_DEVICE_ICM_H_

#include "Icm_cakulate.h"
#include "include_lib.h"


typedef struct 
{
  float Acc_X_Data;
  float Acc_Y_Data;
  float Acc_Z_Data;
  float Gyro_X_Data;
  float Gyro_Y_Data;
  float Gyro_Z_Data;
}ICM20602_Data_Str;

typedef struct
{
  float XX;
  float YY;
  float ZZ;
}XYZ_Data_Str;

extern XYZ_Data_Str Acc, Gyro, Gyro_Offset;

extern ICM20602_Data_Str ICM20602_Data;


void icmInit(void);
float ICM20602_Calculate(void);
void ICM20602_Calibration(void);

#endif /* MIDDLEWARES_DEVICE_ICM_H_ */
